import os
import subprocess

# 获取当前脚本所在的绝对路径
current_directory = os.path.dirname(os.path.abspath(__file__))

# 构造目标脚本的绝对路径
script_path = os.path.join(current_directory, 'run_lr.py')

alice_info = 'alice20-192.168.50.20'
bob_info = 'alice192-192.168.50.192'
self_info = alice_info
# 使用 subprocess.run 来执行脚本
for cluster in range(31211, 31215, 2):
    subprocess.Popen([
        'python', '-u', script_path, alice_info, bob_info, self_info,
        str(cluster),
        str(cluster + 1)
    ])
